<template>
  <div class="app">
    <h2 class="content">这是App组件</h2>
    <input type="text" ref="iptEle"/>
    <button @click="getMsg">点击查看Count实例</button>
<!--  拿到的是Count的实例  -->
    <Count ref="Countcomponment"></Count>
  </div>
</template>


<script>
import Count from "@/components/Count";
export default {
    name:"app",
  components: {
      Count
  },
  methods:{
      getMsg(){
        console.log(this)
        //ref获取的是Count这个实例
        console.log(this.$refs.Countcomponment)
      }
  }
}
</script>
